<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>七牛云第二个</title>
</head>
<body>
<script>
    function curry(fn) {
        if(fn.length>=3){
            fn();
        }else if(fn.length===2){
            return function(arguments){
                fn(arguments);
            }
        }else if(fn.length===1){
        }
    }

    function add(a,b,c){
        return a+b+c;
    }

    var  addEx=curry(add);
    console.log(addEx(1,2,3));
    console.log(addEx(1,2)(3));

</script>
</body>
</html>